﻿#ifndef CALENDAR_H
#define CALENDAR_H

#include <QWidget>
#include <QList>
#include <QtTextToSpeech/QTextToSpeech>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include "landscapeimage.h"
#include "displaysetting.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Calendar; }
QT_END_NAMESPACE

class Calendar : public QWidget
{
    Q_OBJECT

public:
    Calendar(QWidget *parent = nullptr);
    ~Calendar();
public slots:
    void ImagesReceive(QList<LandscapeImage*> images,int type); //接收设置发来的图片路径

private slots:
    void on_pushButton_set_clicked();   //设置图片规则点击按钮事件
    void on_calendarWidget_clicked(const QDate &date);  //点击日历事件

private:
    Ui::Calendar *ui;
    QList<LandscapeImage*> Images;  //存储接收设置界面传过来的图片路径
    QList<LandscapeImage*> Spring;  //存储春天的图片路径
    QList<LandscapeImage*> Summer;  //存储夏天的图片路径
    QList<LandscapeImage*> Autumn;  //存储秋天的图片路径
    QList<LandscapeImage*> Winter;  //存储冬天的图片路径
    QPixmap  defaultImage;  //默认图片路径用于没选择图片时候显示
    DisplaySetting *displaysetting; //设置界面的指针，用于打开那个界面
    QTextToSpeech *speech;
    QMediaPlayer *player;
    QMediaPlaylist *playlist;
    int ruleType; //存储规则类型
};
#endif // CALENDAR_H
